import 'package:flutter/material.dart';
import '../../../utils/base.dart';
import '../../../widgets/tabs.dart';

import 'components/common_list_item.dart';

class DetailCoin extends StatelessWidget {
  const DetailCoin({Key key}) : super(key: key);

  Widget _tab1() {
    return ListView(
      children: <Widget>[
        CommonListItem(
          title: '充值',
          subtitle: '2109-121-01',
          rightText: '+1000币',
          rightTextColor: HexColor('333333'),
        ),
        CommonListItem(
          title: '充值',
          subtitle: '2109-121-01',
          rightText: '+1000币',
          rightTextColor: HexColor('ff9434'),
        ),
      ],
    );
  }

  Widget _tab2() {
    return ListView(
      children: <Widget>[
        CommonListItem(
          title: '投币',
          subtitle: '2109-121-01',
          rightText: '-100币',
          rightTextColor: HexColor('333333'),
        ),
        CommonListItem(
          title: '投币',
          subtitle: '2109-121-01',
          rightText: '-10币',
          rightTextColor: HexColor('ff9434'),
        ),
      ],
    );
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      child: XTabBar(
        tabs: [XTab('收入'), XTab('支出')],
        contents: <Widget>[
          _tab1(),
          _tab2(),
        ],
      ),
    );
  }
}
